package org.yzh.web.mapper.mg.service.impl;

import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Service;
import org.yzh.protocol.t808.T0200;
import org.yzh.web.mapper.mg.service.T0200Service;

import javax.annotation.Resource;
@Service
public class T0200ServiceImpl implements T0200Service {

    @Resource
    private MongoTemplate mongoTemplate;

    @Override
    public void saveT0200 (T0200 t0200) {
        mongoTemplate.save (t0200);
    }

    @Override
    public void removeT0200 (T0200 t0200) {
        Query query = new Query (new Criteria ("messageId").is (t0200.getMessageId ()));
        mongoTemplate.remove (query);
    }

    @Override
    public void updateT0200 (T0200 t0200) {

    }
}
